#include "periph_devices.hpp"

int main(int argc, char *argv[])
{
    sros_info << "this generate by sros, name: PeriphDevices, module: device, start..." << sros_endl;

    // 创建机器人节点
    auto node = std::make_shared<PeriphDevices>();

    // 把机器人节点丢 sros::core 里头，让sros::core 去启动节点
    Core::Param param;
    param.append_node(node);

    // sros::core 初始化
    auto ret = Core::ins().init(param);
    if (!ret.v)
    {
        sros_info << ret.msg << sros_endl;
        return 0;
    }

    // sros::core 运行
    Core::ins().run();
    
    sros_info << "this generate by sros, name: PeriphDevices, module: device, stop..." << sros_endl;
}